<% if logged_in? %>
   You are logged in as <%=h current_user.login %>
   [<%=link_to 'Logout',session_url,:method=>:delete%>]
 <% else %>
   You are currently not logged in.
     [<%= link_to 'Login', new_session_url %>] or
     [<%= link_to 'Sign Up', new_user_url %>]
 <% end %>